#!/bin/bash
function check_env () 
{
  for i in $(seq -w $#);
  do
    local msg=$1 && shift
    local ret=${msg}
    which $ret 2> /dev/null
    if [[ "$?" -ne 0 ]]; then
      echo "$ret command not found!"
    fi
  done
}
check_env $*